package br.com.gerenciamento.pg.framework.core.service;

import java.io.Serializable;
import java.util.List;
import org.springframework.data.domain.Persistable;

public interface IEntityService<T extends Persistable<ID>, ID extends Serializable> {

	public <S extends T> S save(S s);

    public <S extends T> List<S> save(Iterable<S> itrbl);

    public T findOne(ID id);

    public boolean exists(ID id);

    public List<T> findAll();

    public List<T> findAll(Iterable<ID> itrbl);

    public long count();

    public void delete(ID id);

    public void delete(T t);

    public void delete(Iterable<? extends T> itrbl);

    public void deleteAll();
	
    public List<T> findByExample(T example);
}
